﻿/*
-----------------------------------
    Rodeo Game Engine

    Rodeo Core Module
    TimeManager.h - header file

    Copyright(c) Marcin Goryca
-----------------------------------
*/
#ifndef RODEO_CORE_TIMEMANAGER_H_
#define RODEO_CORE_TIMEMANAGER_H_

#ifndef RODEO_CORE_SINGLETON_H_
#include "core\singleton.h"
#endif    //RODEO_CORE_SINGLETON_H_

#ifndef RODEO_CORE_TIMER_H_
#include "core\Timer.h"
#endif    //RODEO_CORE_TIMER_H_

#ifndef RODEO_CORE_MASTERMANAGER_H_
#include "core\mastermanager.h"
#endif    //RODEO_CORE_MASTERMANAGER_H_

namespace rodeocore
{
class TimeManager : public Singleton<TimeManager>, public MasterManager
{
public:
    TimeManager()
        :time_(NULL),
         fps_show_(false)
    {
        init();
    }

    ~TimeManager()
    {
        clean();
    }

    // Get pointer to Timer Object
    Timer* getTimer() const { return time_; }

    // Get FPSShow
    bool getFpsShow() const { return fps_show_; }

private:
    // This method is responsible for initiliazation of member objects
    void init();

    // This method is responsible for cleaning of member obejcts
    void clean();
    bool toggleFPS();
    float showFPS();

//==== MEMBERS ====//
   Timer* time_;

   bool fps_show_;
};
}    //end of rodeocore namespace
#endif    //RODEO_CORE_TIMEMANAGER_H_